******************************************************************
******************************************************************
*Schito, Marco: The politics of State aid in the European Union: explaining variation in aid allocation among Member States
*Published in: Journal of Public Policy
*Stata do file for replication analysis of Figures 1 and 2
******************************************************************
******************************************************************


sysuse auto, clear
use jpp_state_aid.dta
xtset country1 year

***State aid graphs

***Figure 1

bysort year: egen mean_aid = mean(indservaidpc)

graph twoway line mean_aid year, ///
ytitle(Aid to industry and services (%GDP), size(medsmall) margin(small))  ///
 ylabel(, labsize(small) labgap(vsmall) glcolor(white)) yscale(lcolor(white) line) ymtick(, nogrid) ///
 scheme(s2mono) graphregion(fcolor(white) ///
 lcolor(white) lpattern(solid) ifcolor(white) ilcolor(white) ilpattern(solid)) ///
 plotregion(fcolor(white) lcolor(white) lpattern(solid) ///
 ifcolor(white) ilcolor(white) ilpattern(solid)) ///
 xscale(lcolor(white) line) xlabel(, labsize(small) labgap(vsmall)) xtitle(Year, size(medsmall) margin(small)) ///
 note(Source: DG COMP, position(5))

***Figure 2
graph box indservaidpc, over(countrycode, label(labsize(2.5)) ///
 axis(lcolor(white))) box(1, fcolor(gs11) fintensity(inten70) lcolor(black)) ///
 medtype(cline) medline(lcolor(black) lwidth(thin)) cwhisker lines(lcolor(black) lwidth(medium)) ///
 marker(1, mcolor(black)) ytitle(Aid to industry and services (%GDP)) ///
 ytitle(, box fcolor(white) lcolor(white)) yscale(noline) yline(0.56, lcolor(black) lpattern(dash)) ///
 ylabel(, glcolor(white)) ymtick(, nogrid) scheme(s2mono) graphregion(fcolor(white) ///
 lcolor(white) lpattern(solid) ifcolor(white) ilcolor(white) ilpattern(solid)) ///
 plotregion(fcolor(white) lcolor(white) lpattern(solid) ///
 ifcolor(white) ilcolor(white) ilpattern(solid))
 
 
